import {
    useRouteStore,
} from './routeStore';

// 路由后跳转拦截器
export default (options: any) => {
    console.log('afterRouteEnter', options);
    const page = getCurrentPages();
    const currentPage = page[page.length - 1];
    const routeStore = useRouteStore();
    const isSubPackage = routeStore.isSubPackage(currentPage.route);
    if(isSubPackage) {
        routeStore.addCachePage(currentPage.route);
    }
}